package com.atcper

/**
 * @author : ranzlupup
 * @date : 2023/2/22 08:39
 */
object Scala06_function_nightmare {
    def main(args: Array[String]): Unit = {
        def f(name: String): String = {
            println(f"$name")
                          name
        }

        def f2(age: Int): String = {
            age.toString
        }

        // f("ranzili")
        val q: Function1[Int, String] = f2 _
        val d: Int => String = f2

        println(d(11111))
        println(q)
        println(d)

        def returnTest(str: String) : String = {
            println(s"${str}")
            str
        }
        returnTest("name")

        def nothingTest() : Nothing = {
            println("nothingTest Running...")
            throw new Exception()
        }
        nothingTest()

    }

}
